﻿using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Extensions.DependencyInjection;


using Utils;
using Utils.Cache.Redis;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class RedisExtensions
    {
        public static IServiceCollection AddRedisCache(this IServiceCollection services)
        {
            services.AddCache<RedisCacheStrategy>();
            services.AddSingleton<RedisCacheStrategy>();
            services.AddSingleton(typeof(SeckillHelper<>));
            return services;
        }

    }
}
